<?phpuse Illuminate\Database\Eloquent\Model;use Illuminate\Database\Capsule\Manager as DB;class qudaiModel extends Model{	protected $table 		= 'qudai';	public	  $primaryKey	= 'qudai_id';    protected function serializeDate($date)    {        return $date->format('Y-m-d H:i:s');    }    public function member()    {        return $this->belongsTo(memberModel::class, 'qudai_id', 'id');    }    public function qudai_last_log()    {        return $this->hasOne(qudailogModel::class, 'qudai_id', 'qudai_id')->orderBy('id', 'desc');    }    public function qudai_log()    {        return $this->hasMany(qudailogModel::class, 'qudai_id', 'qudai_id')->orderBy('id', 'desc');    }    public function qudai_level()    {        return $this->hasOne(qudailevelModel::class, 'level', 'area_level');    }}